<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>" />
<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
<script type="text/javascript" src="js/bootstrap.js"></script>
<link rel="stylesheet"
	href="css/font-awesome-4.7.0/css/font-awesome.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>简约书评网</title>
</head>


<body>
	<%@ include file="/header.jsp"%>
	<div class="container">


		<div class="media">

			<img src="${author.authorPicture}" class="align-self-start mr-3">
			<div class="media-body">

				<h5>作者简介:</h5>
				<p>${author.authorIntroduction}</p>


			</div>
		</div>
		<br>
		<div>
			<div class="page-header">
				<h4>最新作品</h4>
			</div>
			<c:forEach items="${author.newestBooks}" var="book"
				varStatus="status">
				<c:if test="${(status.index%6)==0}">
					<div class="row">
				</c:if>

				<div class="col-md-2 col-sm-2 jQueryEqualHeight3">
					<div class="card">
						<img class="card-img-top " height="140px" src="${book.picture}"
							alt="Card image">
						<div class="card-body">
							<h6 class="card-title">
								<a href="book/detail?bookId=${book.bookId}"> <c:if
										test="${book.title.length() gt 6}">
					${fn:substring(book.title, 0, 6)}..
					</c:if> <c:if test="${book.title.length() le 6}">
					${book.title}
					</c:if>
								</a>
							</h6>
						</div>
					</div>
				</div>
				<c:if test="${(status.index+1)%6==0 }">
		</div>
		</c:if>
		<c:if test="${status.last}">
	</div>
	</c:if>
	</c:forEach>
	<div class="page-header">
		<h4>高分作品</h4>
	</div>
	<c:forEach items="${author.highScoreBooks}" var="book"
		varStatus="status">
		<c:if test="${(status.index%6)==0}">
			<div class="row">
		</c:if>

		<div class="col-md-2 col-sm-2 jQueryEqualHeight3">
			<div class="card">
				<img class="card-img-top " height="140px" src="${book.picture}"
					alt="Card image">
				<div class="card-body">
					<h6 class="card-title">
						<a href="book/detail?bookId=${book.bookId}"> <c:if
								test="${book.title.length() gt 6}">
					${fn:substring(book.title, 0, 6)}..
					</c:if> <c:if test="${book.title.length() le 6}">
					${book.title}
					</c:if>
						</a>
					</h6>
				</div>
			</div>
		</div>
		<c:if test="${(status.index+1)%6==0 }">
	</div>
	</c:if>
	<c:if test="${status.last}">
	</div>
	</c:if>
	</c:forEach>


	</div>

	</div>


	</div>
	<div class="fixed-bottom">
		<%@ include file="/footer.jsp"%>
	</div>
</body>
</html>